package dfbz.homework1;

public class Test04 {
    public static void main(String[] args) {
        char aChar=(getChar(49));
        System.out.println(aChar);
    }
    public static char getChar(int num) {
        char ch = (char) num;//,将传入的参数num转成char类型变量ch
        if (ch >= 65 && ch <= 90) {
            return ch;
        }
        if (ch >= 98 && ch <= 122) {
            return ch;
        }
        if (ch>=48&&ch<=57) {
            return ch;
        }else {
            return 0;
        }
    }
}
